<?php

/**
 * Created by PhpStorm.
 * User: jingx
 * Date: 2017/6/26
 * Time: 16:25
 */
class TestAction extends CommonAction
{
    public function _initialize()
    {

    }

    public function test()
    {
        /** @var JfUserModel $user */
        $user = D('JfUser');
        $user->find(26770);
        $user->relatedUser('oyqiuv-SINySb1JW3O2PTlYoHkgc', 'gh_3e7e411cf92b');
//        $user->getActivity()->sendAward($user);
    }

    public function test2()
    {
        $userActivity = D('UserActivity');
        $userActivity  = $userActivity->joinActivity('5', 'oyqiuvxh9IlJD0URBdVFj7JvZPZ4');
        $userActivity->replyPost();
    }

    public function test3()
    {
        $this->test4('5', 'oyqiuvxh9IlJD0URBdVFj7JvZPZ4');
    }

    public function test4()
    {
        /** @var TestActivityModel $activity */
        $activity = D('TestActivity');
        $activity->find(91);
        $user = D('JfUser');
        $user->find(40896);
        $activity->sendAward($user);
    }

}